<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Public.Master" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="Mailer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Resource("PageTitle") %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>
		<%= Html.Resource("PageTitle") %>
	</h2>
	<%=	Html.ValidationSummary(Html.Resource("ValidationError")) %>
	<% using (Html.BeginForm())
	{ %>
	<div>
		<fieldset>
			<legend>
				<%= Html.Resource("RecipientTitle") %></legend>
			<p>
				<label for="email">
					<%= Html.Resource("EmailPrompt") %>
				</label>
				<%= Html.TextBox("email") %>
				<%= Html.ValidationMessage("email") %>
			</p>
			<p>
				<label for="lists">
					<%= Html.Resource("ListsPrompt") %>
				</label>
				<% foreach (var v in (IList<Mailer.Model.Types.List>)ViewData["Lists"])
	   { %>
				<input type="checkbox" name="lists" checked="checked" value="<%=v.ID%>">
				<%= v.Name %>
				<% }  %>
			</p>
			<p>
				<input type="submit" value="<%= Html.Resource("UnsubscribeButton") %>" />
				<%= Html.ActionLink(Html.Resource("SubscribeButton"), "subscribe")%>
			</p>
		</fieldset>
	</div>
	<% } %>
</asp:Content>
